package wang.hu.bos.web.action.transit;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import wang.hu.bos.domain.transit.InOutStorageInfo;
import wang.hu.bos.service.transit.InOutStorageInfoService;
import wang.hu.bos.web.action.BaseAction;

@Controller
@ParentPackage("json-default")
@Namespace("/")
@Scope("prototype")
public class InOutStorageInfoAction extends BaseAction<InOutStorageInfo> {
	@Autowired
	private InOutStorageInfoService inOutStorageInfoService;
	private String transitInfoid;

	public void setTransitInfoid(String transitInfoid) {
		this.transitInfoid = transitInfoid;
	}

	@Action(value = "inOutStorageInfo_save", results = { @Result(name = "success", location = "./pages/transit/transitinfo.html", type = "redirect") })
	public String save() {
		inOutStorageInfoService.save(transitInfoid, model);
		return SUCCESS;
	}

}
